package cn.shopping.core.enums;

/**
 * 代码自动生成，请不要修改，切记！！！
 */
public enum FilePixelEnum {


     SMALL(1,"宽50px"),
     MIDDLE(2,"宽200px"),
     HALF(3,"原图一半的宽度"),
     QUARTER(4,"原图四分之一的宽度");


     public final Integer code;

     public final String desc;


     private FilePixelEnum(Integer code,String desc)
     {
        this.code=code;
        this.desc=desc;
     }


    public final Integer getCode()
    {
        return this.code;
    }

    public final String getDesc()
    {
        return this.desc;
    }


    public static FilePixelEnum valueOfByCode(Integer code)
    {

        if(code==null)
        {
            return null;
        }

        //宽50px
        if(code.equals(1))
        {
            return SMALL;
        }

        //宽200px
        if(code.equals(2))
        {
            return MIDDLE;
        }

        //原图一半的宽度
        if(code.equals(3))
        {
            return HALF;
        }

        //原图四分之一的宽度
        if(code.equals(4))
        {
            return QUARTER;
        }

         return null;
    }


}
